Skip to content

Conversation

@ybiquitous
Copy link

This PR makes a few minor improvements to the documentation of the Timeout.timeout method. The changes include fixing typos and enhancing formatting for better readability.

We can see the latest version of the documentation here:
https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout

Also, we can verify this change locally by running:

rdoc
open doc/Timeout.html

This commit makes a few minor improvements to the documentation of the `Timeout.timeout` method.
The changes include fixing typos and enhancing formatting for better readability.

We can see the latest version of the documentation here:
https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout

Also, we can verify this change locally by running:

```shell
rdoc
open doc/Timeout.html
```
Comment on lines +224 to +225
# is that Timeout::Error inherits from RuntimeError and might be caught unexpectedly by +rescue+.
# Timeout::ExitException inherits from Exception so it will only be rescued by <tt>rescue Exception</tt>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand those cases will be fixed by @st0012's work to better support Markdown in RDoc, is that correct?
If so I'm not so inclined to have HTML tags here, it looks pretty messy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will fix the rendering though, and the other changes look good so I guess let's go with that for now, and then maybe go back to backticks once RDoc supports them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah if we update RDoc to 7.10 then we can use backticks in rdoc markup too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know when that would happen for ruby/ruby? (since it doesn't seem to work for https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting because the rescue one line above is now correctly rendered. And this line is rendered as ‘rescue Exception`. I wonder if the beginning quote is actually not a backtick character 🤔

Copy link
Member

@tompng tompng Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In RDoc format, Only `single_word` is allowed mainly because of the restriction using regexp and gsub in parsing (I think).
Remaining backticks and quotes are converted to multibyte quotes ‘’”“

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants